/*******************************************************************************
  * @file                   shell.h
  * @Author:                MQjehovah                 mail:MQjehovah@hotmail.com
  * @version                1.0.0
  * @date                   2017.5.9
  * @brief                  
  ******************************************************************************
  * @attention
*******************************************************************************/
#ifndef __SHELL_H
#define __SHELL_H
/* Includes ------------------------------------------------------------------*/
#include "stm32f4xx_conf.h"
/* Definition ----------------------------------------------------------------*/
#define PROMPT "\033[33m MQjehovah>> \033[0m"

#define SHELL_USART USART3
#define CMD_REC_BUF_LEN 64 //指令接收缓冲区长度
#define CMD_ARG_MAX_CNT 8  //指令参数最大个数

#define shell_read_char(ch) ring_buffer_read(pE34_RX_BUF, ch)
#define shell_send_char(ch) usart_send_char(SHELL_USART, ch)
#define shell_send_str(str) usart_send_str(SHELL_USART, str)
#define shell_send_number(num, base) usart_send_number(SHELL_USART, num, base)

extern char *CMDList[];
/* Exported Functions --------------------------------------------------------*/
void shell_loop(void);
char *shell_readline(char *buffer);
int shell_process(char *cmd);
u8 string_compare(char *str1, char *str2);
#endif
/*********************************END OF FILE**********************************/
